//
//  KKBaseItemList.h
//  FreightAssistant
//
//  Created by leo on 15/11/3.
//  Copyright © 2015年 leo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <objc/runtime.h>

@interface KKBaseItemList : NSObject {
    
    NSMutableArray *_itemArray;
}


@property (nonatomic, assign) NSInteger pageIndex;

@property (nonatomic, readonly) NSInteger count;

- (void)appendItemsWithResponse:(NSDictionary*)response withPageIndex:(NSInteger)pageIndex;

- (void)appendItemsWithResponse:(NSDictionary*)response withPageIndex:(NSInteger)pageIndex  withItemClass:(Class)itemClass;

- (void)appendItemsWithArray:(NSArray*)itemArray;

- (void)appendItemsWithArray:(NSArray*)itemArray withItemClass:(Class)itemClass;


- (id)objectAtIndex:(NSUInteger)index;
- (void)removeObject:(id)anObject;
- (void)removeObjectOfIndex:(NSUInteger)index;
- (void)removeAllObjects;

@end




@interface KKBaseItem : NSObject <NSCopying, NSCoding>

@property (nonatomic, copy) NSString *kk_identifier;
@property (nonatomic, assign) BOOL kk_enabled;

- (NSString* )kk_valueForKey:(NSString *)key;

@end